package com.haiwei.poi.word.loop;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;

import java.util.ArrayList;
import java.util.List;

/**
 * 对表的描述.
 * 表何尝不是一组row集合呢
 *
 * @date: 2022-06-27
 * @version: 1.0
 * @author: karry@haiwei.com
 */
@Data
@NoArgsConstructor
public class HaiweiTable extends HaiweiRowGroupAbstract{
    
    // 包含多个行组  组成的
    private List<HaiweiRowGroup> rows = new ArrayList<>();
    
    public HaiweiTable(XWPFTable table, int startIndex, int endIndex) {
        super(table, startIndex, endIndex);
    }
    
    @Override
    public void addRowGroup(HaiweiRowGroup rowGroup){
        rows.add(rowGroup);
    }
}
